package com.ruoyi.gt.controller;

import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.gt.domain.GtMovieListInfo;
import com.ruoyi.gt.service.IGtMovieListInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 电影卡片Controller
 *
 * @author xkang
 * @date 2020-06-19
 */
@RestController
@RequestMapping("/wx-app/gt/movie")
public class AppGtMovieListInfoController extends BaseController
{
    @Autowired
    private IGtMovieListInfoService gtMovieListInfoService;

    /**
     * 查询电影卡片列表
     */
    @GetMapping("/list")
    public TableDataInfo list(GtMovieListInfo gtMovieListInfo)
    {
        startPage();
        List<GtMovieListInfo> list = gtMovieListInfoService.selectGtMovieListInfoList(gtMovieListInfo);
        return getDataTable(list);
    }



    /**
     * 获取电影卡片详细信息
     */
    @GetMapping(value = "/{movieId}")
    public AjaxResult getInfo(@PathVariable("movieId") Long movieId)
    {
        return AjaxResult.success(gtMovieListInfoService.selectGtMovieListInfoById(movieId));
    }


}
